package com.card.game.log;

import java.util.List;
import java.util.Vector;

import com.card.game.Card;
import com.card.game.CardHeap;
import com.card.game.event.EventType;
import com.google.common.collect.Lists;

/**   
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author siyunlong  
 * @date 2016年8月29日 上午9:47:09 
 * @version V1.0   
 */
public class PlayerResult {
	String userId;
	Vector<Card> hand;
	List<Card> gang;
	List<Card> dui;
	List<CardHeap> chi;//吃
	List<Card> huaList;//花牌
	List<EventType> eventTypes;
	Card huCard;
	int gangScore;
	int fanScore;
	int sumScore;
	int fengGangNum;
	String showInfo;//新加
	
	
	public PlayerResult(String userId, Vector<Card> hand, List<Card> gang,List<Card> huaList, List<Card> dui, List<CardHeap> chi,List<EventType> eventTypes,
			int gangScore, int fanScore, int sumScore,int fengGang,String showInfo) {
		super();
		this.userId = userId;
		this.hand = hand;
		this.gang = gang;
		this.chi = chi;
		this.dui = dui;
		this.huaList = huaList;
		this.eventTypes = Lists.newArrayList(eventTypes);
		this.gangScore = gangScore;
		this.fanScore = fanScore;
		this.sumScore = sumScore;
		this.fengGangNum = fengGang;
		this.showInfo= showInfo;
	}


	public String getUserId() {
		return userId;
	}


	public void setUserId(String userId) {
		this.userId = userId;
	}


	public Vector<Card> getHand() {
		return hand;
	}


	public void setHand(Vector<Card> hand) {
		this.hand = hand;
	}


	public List<Card> getGang() {
		return gang;
	}


	public void setGang(List<Card> gang) {
		this.gang = gang;
	}


	public List<Card> getDui() {
		return dui;
	}


	public void setDui(List<Card> dui) {
		this.dui = dui;
	}


	public int getGangScore() {
		return gangScore;
	}


	public void setGangScore(int gangScore) {
		this.gangScore = gangScore;
	}


	public int getFanScore() {
		return fanScore;
	}


	public void setFanScore(int fanScore) {
		this.fanScore = fanScore;
	}


	public int getSumScore() {
		return sumScore;
	}


	public void setSumScore(int sumScore) {
		this.sumScore = sumScore;
	}
	
	public void calHuCard(Card lastInCard,Card lastOutCard,boolean isZimo,boolean isHu) {
		if(isZimo) {
			this.hand.remove(lastInCard);
			this.huCard = lastInCard;
			return;
		}else if(isHu) {
			this.huCard = lastOutCard;
		}
	}
}
